<section class="content-header">
    <h1>
        系统设置
        <small></small>
    </h1>
</section>

<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <!-- general form elements -->
            <div class="box box-danger">
                <div class="box-header with-border">
                    <h3 class="box-title">商城设置</h3>
                </div>
                <!-- form start -->
                <form action="{:U('Admin/Config/shopSet')}" method="post" class="form-horizontal">
                    <div class="box-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">商城名称</label>

                            <div class="col-sm-10">
                                <input class="form-control" name="name" placeholder="" value="{$config.name}"
                                       type="text">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="control-label col-md-2">微信自动登录</label>

                            <div class="col-md-7">
                                <label class="radio-inline"><input name="oauth" type="radio"
                                    <if condition="$config.oauth eq 1">checked="checked"</if>
                                    value="1"><span>开启</span></label>
                                <label class="radio-inline"><input name="oauth" type="radio"
                                    <if condition="$config.oauth eq 0">checked="checked"</if>
                                    value="0"><span>关闭</span></label>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">微信网页授权调试模式</label>

                            <div class="col-sm-10">
                                <label class="radio-inline"><input name="oauth_debug" type="radio"
                                    <if condition="$config.oauth_debug eq 1">checked="checked"</if>
                                    value="1"><span>开启</span></label>
                                <label class="radio-inline"><input name="oauth_debug" type="radio"
                                    <if condition="$config.oauth_debug eq 0">checked="checked"</if>
                                    value="0"><span>关闭</span></label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">账户支付</label>

                            <div class="col-sm-10">
                                <label class="radio-inline"><input name="balance_payment" type="radio"
                                    <if condition="$config.balance_payment eq 1">checked="checked"</if>
                                    value="1"><span>开启</span></label>
                                <label class="radio-inline"><input name="balance_payment" type="radio"
                                    <if condition="$config.balance_payment eq 0">checked="checked"</if>
                                    value="0"><span>关闭</span></label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">微信支付</label>

                            <div class="col-sm-10">
                                <label class="radio-inline"><input name="wechat_payment" type="radio"
                                    <if condition="$config.wechat_payment eq 1">checked="checked"</if>
                                    value="1"><span>开启</span></label>
                                <label class="radio-inline"><input name="wechat_payment" type="radio"
                                    <if condition="$config.wechat_payment eq 0">checked="checked"</if>
                                    value="0"><span>关闭</span></label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">支付宝支付</label>

                            <div class="col-sm-10">
                                <label class="radio-inline"><input name="alipay_payment" type="radio"
                                    <if condition="$config.alipay_payment eq 1">checked="checked"</if>
                                    value="1"><span>开启</span></label>
                                <label class="radio-inline"><input name="alipay_payment" type="radio"
                                    <if condition="$config.alipay_payment eq 0">checked="checked"</if>
                                    value="0"><span>关闭</span></label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">货到付款</label>

                            <div class="col-sm-10">
                                <label class="radio-inline"><input name="cool_payment" type="radio"
                                    <if condition="$config.cool_payment eq 1">checked="checked"</if>
                                    value="1"><span>开启</span></label>
                                <label class="radio-inline"><input name="cool_payment" type="radio"
                                    <if condition="$config.cool_payment eq 0">checked="checked"</if>
                                    value="0"><span>关闭</span></label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">公众号二维码</label>

                            <div class="col-sm-10">
                                <div class="fileupload fileupload-new" data-provides="fileupload">
                                    <div class="fileupload-new img-thumbnail">
                                        <empty name="config['qrcode']"><img
                                                src="__PUBLIC__/Admin/dist/img/noimage.gif">
                                            <else/>
                                            <img src="{$config.qrcode}">
                                        </empty>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-2"></label>

                            <div class="col-sm-10">
                                <a class="btn btn-default" href="{:U('Admin/Wechat/getQRCode')}">生成公众号二维码
                                </a>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">商城公告</label>

                            <div class="col-sm-10">
                                <textarea class="form-control" name="notification"
                                          rows="3">{$config.notification}</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">温馨提示</label>

                            <div class="col-sm-10">
                                <textarea class="form-control" name="reminder" rows="3">{$config.reminder}</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">客服</label>

                            <div class="col-sm-10">
                                <input class="form-control" placeholder="" name="tel" value="{$config.tel}" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">地址</label>

                            <div class="col-sm-10">
                                <input class="form-control" placeholder="" name="address" value="{$config.address}"
                                       type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-2">订单满减</label>

                            <div class="col-md-2">
                                <input class="form-control" name="full" value="{$config.full}" placeholder="满多少"
                                       type="number">
                            </div>
                            <div class="col-md-2">
                                <input class="form-control" name="discount" value="{$config.discount}" placeholder="减多少"
                                       type="number">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">运费</label>

                            <div class="col-sm-10">
                                <input class="form-control" placeholder="" name="freight" value="{$config.freight}"
                                       type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">配送时间</label>

                            <div class="col-sm-10">
                                <textarea class="form-control" name="delivery_time"
                                          rows="3">{$config.delivery_time}</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">备注</label>

                            <div class="col-sm-10">
                                <input class="form-control" name="remark" placeholder="" value="{$config.remark}"
                                       type="text">
                            </div>
                        </div>
                    </div>
                    <!-- /.box-body -->

                    <div class="box-footer">
                        <div class="col-sm-2">
                            <button type="submit" class="btn btn-block btn-danger">保存</button>
                        </div>
                    </div>
                </form>
            </div>
            <!-- /.box -->

        </div>
        <!--/.col (right) -->
    </div>
</section>

